package cn.aaa.openFeign;

import cn.aaa.constants.AllConsts;
import cn.aaa.domain.RuleVo;
import cn.aaa.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;

@FeignClient(value =  AllConsts.Remote.SERVICE_NAME_RULE,
        fallbackFactory = RuleOpenfeignFallbackFactory.class)
public interface RuleOpenFeign {
    @PostMapping(AllConsts.Remote.REMOTE_PREFLIX_RULE)
    JSONResult pricing(@RequestBody @Valid RuleVo ruleVo);
}
